home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / board / IGNUChess151.lha / GNUChess-1.51 / gnuchess.h < prev    next >
C/C++ Source or Header  |  1994-02-10  |  3KB  |  99 lines

  1. /************************************************************************/
  2. /* This  file  contains code for CHESS.  Copyright (C) 1986, 1987, 1988    */
  3. /* Free Software Foundation, Inc.                                        */
  4. /*                                                                        */
  5. /* This file is part of CHESS.                                            */
  6. /*                                                                        */
  7. /* CHESS is distributed in the hope that it will be useful, but WITHOUT    */
  8. /* ANY  WARRANTY.   No  author or distributor accepts responsibility to    */
  9. /* anyone for the consequences of using it or for whether it serves any    */
  10. /* particular  purpose  or  works at all, unless he says so in writing.    */
  11. /* Refer to the CHESS General Public License for full details.            */
  12. /*                                                                        */
  13. /* Everyone  is  granted  permission  to  copy, modify and redistribute    */
  14. /* CHESS,  but only under the conditions described in the CHESS General    */
  15. /* Public  License.   A  copy  of this license is supposed to have been    */
  16. /* given  to  you  along  with  CHESS  so  you can know your rights and    */
  17. /* responsibilities.   It  should  be  in  a file named COPYING.  Among    */
  18. /* other things, the copyright notice and this notice must be preserved    */
  19. /* on all copies.                                                        */
  20. /************************************************************************/
  21. /* Header file for GNU CHESS                                            */
  22. /************************************************************************/
  23.  
  24. #define neutral        2
  25. #define white        0
  26. #define black        1
  27. #define no_piece    0
  28. #define pawn        1
  29. #define knight        2
  30. #define bishop        3
  31. #define rook        4
  32. #define queen        5
  33. #define king        6
  34. #define pxx            " PNBRQK"
  35. #define qxx            " pnbrqk"
  36. #define rxx            "12345678"
  37. #define cxx            "abcdefgh"
  38. #define check        0x0001
  39. #define capture        0x0002
  40. #define draw        0x0004
  41. #define promote        0x0008
  42. #define cstlmask    0x0010
  43. #define epmask        0x0020
  44. #define exact        0x0040
  45. #define pwnthrt        0x0080
  46. #define maxdepth    30
  47. #define true        1
  48. #define false        0
  49.  
  50. struct leaf {
  51.     short            f, t, score, reply;
  52.     unsigned short    flags;
  53. };
  54.  
  55. struct GameRec {
  56.     unsigned short        gmove;
  57.     short                score, depth, time, piece, color;
  58.     long                nodes;
  59. };
  60.  
  61. struct TimeControlRec {
  62.     short                moves[2];
  63.     long                clock[2];
  64. };
  65.  
  66. struct BookEntry {
  67.     struct BookEntry    *next;
  68.     unsigned short        *mv;
  69. };
  70.  
  71. extern char                        mvstr1[5], mvstr2[5];
  72. extern struct leaf                Tree[2000], *root;
  73. extern short                    TrPnt[maxdepth], board[64],
  74.                                 color[64], row[64], column[64],
  75.                                 locn[8][8], atak[2][64],
  76.                                 PawnCnt[2][8], castld[2],
  77.                                 kingmoved[2], c1, c2, *atk1, *atk2,
  78.                                 *PC1, *PC2, mate, post, opponent,
  79.                                 computer, Sdepth, Awindow, Bwindow,
  80.                                 dither, quit, reverse, bothsides,
  81.                                 hashflag, InChk, player, force,
  82.                                 beep, meter, timeout, xwndw,
  83.                                 GameCnt, Game50, epsquare, lpost,
  84.                                 rcptr, contempt, MaxSearchDepth,
  85.                                 TCflag, TCmoves, TCminutes,
  86.                                 OperatorTime, otherside[3],
  87.                                 Stboard[64], Stcolor[64];
  88.  
  89. extern long                        ResponseTime, ExtraTime, Level, et,
  90.                                 et0, time0, cputimer, ft, NodeCnt,
  91.                                 evrate, ETnodes, EvalNodes, HashCnt;
  92.  
  93. extern struct GameRec            GameList[240];
  94. extern struct BookEntry            *Book;
  95. extern struct TimeControlRec    TimeControl;
  96. extern unsigned short            hint, PrVar[maxdepth];
  97.  
  98. #define HZ 60
  99.